import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }


export function getWorkOrderPage(data) {
    return request({
        url: getUrl("admin/workOrder/getWorkOrderPage"),
        method: 'post',
        data
    })
}


//添加工单Vo
export function getInWorkOrderVo(data) {
    return request({
        url: getUrl("admin/workOrder/getInWorkOrderVo"),
        method: 'post',
        data
    })
}


//添加故障工单
export function addFaultInWorkOrder(data) {
    return request({
        url: getUrl("admin/workOrder/addFaultInWorkOrder"),
        method: 'post',
        data
    })
}

export function getInWorkOrderList(data) {
    return request({
        url: getUrl("admin/workOrder/getInWorkOrderList"),
        method: 'post',
        data
    })
}

//删除工单
export function deleteInWorkOrder(data){
    return request({
        url: getUrl("admin/workOrder/deleteInWorkOrder"),
        method: 'post',
        data
    })
}
//添加工单
export function addInWorkOrder(data){
    return request({
        url: getUrl("admin/workOrder/addInWorkOrder"),
        method: 'post',
        data
    })
}
//修改工单
export function updateInWorkOrder(data){
    return request({
        url: getUrl("admin/workOrder/updateInWorkOrder"),
        method: 'post',
        data
    })
}

//分配人员
export function assignPeople(data){
    return request({
        url: getUrl("admin/workOrder/assignPeople"),
        method: 'post',
        data
    })
}


//确认工单
export function confirmWorkOrder(data){
    return request({
        url: getUrl("admin/workOrder/confirmWorkOrder"),
        method: 'post',
        data
    })
}


//开始执行
export function startChangeStatus(data){
    return request({
        url: getUrl("admin/workOrder/startChangeStatus"),
        method: 'post',
        data
    })
}

//反馈
export function communicationNeeds(data){
    return request({
        url: getUrl("admin/workOrder/communicationNeeds"),
        method: 'post',
        data
    })
}

//确认结束
export function confirmEndChangeStatus(data){
    return request({
        url: getUrl("admin/workOrder/confirmEndChangeStatus"),
        method: 'post',
        data
    })
}

//审核
export function workOrderWaitingForReview(data){
    return request({
        url: getUrl("admin/workOrder/workOrderWaitingForReview"),
        method: 'post',
        data
    })
}

//维保审核
export function wbConfirm(data){
    return request({
        url: getUrl("admin/workOrder/wbConfirm"),
        method: 'post',
        data
    })
}

//最终完成
export function orderUltimateEnd(data){
    return request({
        url: getUrl("admin/workOrder/orderUltimateEnd"),
        method: 'post',
        data
    })
}

//继续整改
export function workOrderContinueToRectify(data){
    return request({
        url: getUrl("admin/workOrder/workOrderContinueToRectify"),
        method: 'post',
        data
    })
}

//退回
export function workOrderReturn(data){
    return request({
        url: getUrl("admin/workOrder/workOrderReturn"),
        method: 'post',
        data
    })
}

//沟通
export function communicate(data){
    return request({
        url: getUrl("admin/workOrder/communicate"),
        method: 'post',
        data
    })
}

//沟通结束继续执行
export function communicationFinishBecomeContinue(data){
    return request({
        url: getUrl("admin/workOrder/communicationFinishBecomeContinue"),
        method: 'post',
        data
    })
}

//故障转维保
export function toMaintenanceWorkOrder(data){
    return request({
        url: getUrl("admin/workOrder/toMaintenanceWorkOrder"),
        method: 'post',
        data
    })
}

//消防审核整改时间
export function fireAuditTime(data){
    return request({
        url: getUrl("admin/workOrder/fireAuditTime"),
        method: 'post',
        data
    })
}

//业主选择自主购买
export function selfBuy(data){
    return request({
        url: getUrl("admin/workOrder/selfBuy"),
        method: 'post',
        data
    })
}

//维保购买
export function maintenanceBuy(data){
    return request({
        url: getUrl("admin/workOrder/maintenanceBuy"),
        method: 'post',
        data
    })
}

//业主选择委托代购
export function trustBuy(data){
    return request({
        url: getUrl("admin/workOrder/trustBuy"),
        method: 'post',
        data
    })
}

//购买完成
export function buyDone(data){
    return request({
        url: getUrl("admin/workOrder/buyDone"),
        method: 'post',
        data
    })
}

export function inputUserAndTime(data){
    return request({
        url: getUrl("admin/workOrder/inputUserAndTime"),
        method: 'post',
        data
    })
}

//审核未通过
export function unapproved(data) {
    return request({
        url: getUrl("admin/workOrder/unapproved"),
        method: 'post',
        data
    })
}